import App from './App'
//引入普通请求
import {
	myRequest
} from './utils/api.js'
Vue.prototype.$myRequest = myRequest
//引入文件上传请求
import {
	myFileRequest
} from './utils/api.js'
Vue.prototype.$myFileRequest = myFileRequest
//引入sso请求
import {
	mySsoRequest
} from './utils/api.js'
Vue.prototype.$mySsoRequest = mySsoRequest
//引入全局工具类
import * as Tool from './utils/utils.js'
Vue.prototype.Tool = Tool
//引入h5扫描工具类模块
import {
	commonScan
} from './utils/scanH5.js'
Vue.prototype.$commonScan = commonScan
//引入全局状态管理模块
import store from './store'
Vue.prototype.$store = store
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false

Vue.directive('perHidden', {
	bind: function(el, binding, vnode) {},
	inserted: function(el, binding, vnode) {
		let perHiddenValue = binding.value
		if (perHiddenValue == '' || typeof perHiddenValue == 'undefined') {}
		if (perHiddenValue) {
			let preHiddenData = JSON.parse(uni.getStorageSync('preHiddenData'))
			if (!preHiddenData.includes(perHiddenValue)) {
				el.style.display = 'none'
			}
		}
	}
})


App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// #endif
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app,
		store
	}
}
// #endif